package com.eclipse.e20200131_模拟tomcat.moni_tomcat.tomcat;

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.Socket;
import java.util.concurrent.TimeUnit;

public class Client {

	public static void main(String[] args) throws Exception {
		Socket socket = new Socket("10.70.30.254", 8080);

		BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));

		//TimeUnit.SECONDS.sleep(300);

		writer.write("GET /servletb http1.1\r\n");
		writer.flush();

	
		BufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream()));
		System.out.println(reader.readLine());

	}

}
